import {Actor, Action} from 'iflux2';
import {OrderActorType} from '../constant/action-type';


export default class OrderActor extends  Actor {
    defaultState() {
        return {
            order: {},
            orderStatus: ''
        }
    }


    @Action(OrderActorType.SET_ORDER)
    setOrder(state, order) {
        return state.set('order', order);
    }


    @Action(OrderActorType.SET_ORDER_STATUS)
    setOrderStatus(state, orderStatus) {
        return state.set('orderStatus', orderStatus)
    }
}